package com.cy.jt.controller;

import com.cy.jt.pojo.Rights;
import com.cy.jt.service.RightsService;
import com.cy.jt.vo.SysResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @description:
 * @author: LiuXingYu
 * @date: 2021/8/4 11:51
 */
@RestController
@RequestMapping("/rights")
@CrossOrigin
public class RightsController {

    @Autowired
    private RightsService rightsService;

    @GetMapping("/getRightsList")
    public SysResult getRightList(){
        List<Rights> rightList= rightsService.getRightList();
        return SysResult.success(rightList);
    }

    @GetMapping("/getRightsListAll")
    public SysResult getRightsListAll(){
        List<Rights> rightList= rightsService.getRightList();
        return SysResult.success(rightList);
    }

}
